import LayoutPage from "@/layout";
import { createBrowserRouter, redirect } from "react-router-dom";
import LoginPage from "@/views/login/index";
import ErrorPage from "../views/error/errorPage";
import EmployeePage from "@/views/employee";
import DepartmentPage from "@/views/department/inedx";
import OrganizationPage from "../views/organization/index";
import HomePage from "@/views/home";
import ResetPasswordPage from "@/views/resetPassword";
import RetrievePasswordPage from '../views/retrievePassword/index';
const router = createBrowserRouter([
  {
    path: "/",
    element: <LayoutPage />,
    children: [
      {
        path: "",
        element: <HomePage />,
      },
      {
        path: "/employee",
        element: <EmployeePage />,
      },
      {
        path: "/department",
        element: <DepartmentPage />,
      },
      {
        path: "/organization",
        element: <OrganizationPage />,
      },
    ],
  },
  {
    path: "login",
    element: <LoginPage />,
  },
  {
    path: "resetPassword",
    element: <ResetPasswordPage />,
  },
  {
    path: "retrievePassword",
    element: <RetrievePasswordPage />,
  },
  { path: "*", element: <ErrorPage /> },
]);
export default router;
